﻿// JScript 文件

addOnLoad(initPage);

function initPage()
{
	loadSysJS('coolbuttons.js');
	loadSysJS('Others.js');
	loadSysJS('TableControl.js');
	loadSysJS('PopupWin.js');
	loadSysJS('MenuControl.js');
	loadSysJS("CheckInput.js");
	
	AjaxAction.call("LoginInit");
}

function btnSubmit_onclick(event){
		var strMsg = "";	

		strMsg = strMsg + Validate( "username", "用户名","NotEmpty");
		strMsg = strMsg + Validate( "password", "密码","NotEmpty");

		if( strMsg != "" ) {
			window.alert ( strMsg );
			return false;
		}else{
			var result = FormAction.syncCall('loginform');
			alert(result);
			return;
			if(result==1){
			 location.href="index.html";	
			}
			else if(result==2){
				alert("用户名或密码错误!");
				return false;
			}else{
				alert("系统错误，请联系管理员.");
				return false;
			}
		}
	}
